com.supermap.mapping.dyn
Class DynamicElement
- java.lang.Object
- 
- com.supermap.mapping.dyn.DynamicElement
 
- 
- Direct Known Subclasses:
- DynamicChart, DynamicCircle, DynamicLine, DynamicPoint, DynamicPolygon, DynamicText
 
 
 public abstract class DynamicElement extends java.lang.ObjectThe base class of the dynamic object.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class and Description static classDynamicElement.ElementTypeThe dynamic element type.static interfaceDynamicElement.OnClickListenerThe listener of dynamic data click event.static interfaceDynamicElement.OnDownAndUpListenerThe OnDownAndUpListener for dynamic datastatic interfaceDynamicElement.OnLongPressListenerThe listener of dynamic data long-click event.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaddAnimator(Animator animator)Adds the animation to the dynamic element.voidaddPoint(Point2D pt)Adds the point.voidaddPoints(Point2Ds ps)Add point setvoiddispose()Disposes resources.abstract booleanfromGeometry(Geometry geometry)Create the dynamic data through Geometry.Rectangle2DgetBounds()Gets the range of dynamic object.Point2DsgetGeoPoints()Gets the tuples.intgetID()Gets the ID of dynamic object.doublegetMinShowScale()Gets the minimum display scale.java.lang.StringgetName()Gets the name of the dynamic object, and the default problem null.intgetNameColor()Gets the name font color.floatgetNameOffsetX()floatgetNameOffsetY()Gets the Y offset of the name text.Point2DgetNamePosition()Gets the location coordinates of the name text, and if the user does not have the setting, the object center point is adopted by default.floatgetNameSize()Gets the name font size.DynamicAlignmentgetNameTextAlign()Gets the name text to its method, the default center alignment.DynamicElement.OnDownAndUpListenergetOnDownAndUpListener()Gets the listener OnDownAndUpListener of the objectDynamicElement.OnLongPressListenergetOnLongPressListener()Gets the long-click listening of this objectjava.util.ArrayList<java.lang.Integer>getPart()Gets the point string group info.DynamicStylegetStyle()Gets the style.java.lang.StringgetTag()Gets the label.DynamicElement.ElementTypegetType()Gets the type.java.lang.ObjectgetUserData()Gets the user data.booleanisNameVisible()Gets whether the dynamic object name is visible, and the default false.voidsetMinShowScale(double scale)Sets the minimum display scale.voidsetName(java.lang.String name)Sets the name of a dynamic object.voidsetNameColor(int color)Sets name font color, default blackvoidsetNameOffsetX(float offsetX)Sets the X offset of the name text.voidsetNameOffsetY(float offsetY)Sets the Y offset of the name text.voidsetNamePosition(Point2D position)Sets the location of the name text.voidsetNameSize(float size)Sets name font size default 16pixel.voidsetNameTextAlign(DynamicAlignment align)Sets the name text to its method, the default center alignment.voidsetNameVisible(boolean visible)Sets whether the dynamic object name is visible, and is not visible by default.voidsetOnClickListenner(DynamicElement.OnClickListener listener)Sets the clicking listener.voidsetOnDownAndUpListener(DynamicElement.OnDownAndUpListener listener)Sets the listeners as fingers press down or leave dynamic objects.voidsetOnLongPressListener(DynamicElement.OnLongPressListener listener)Sets the long-click listener.voidsetStyle(DynamicStyle style)Sets the style.voidsetTag(java.lang.String tag)Sets the label.voidsetUserData(java.lang.Object data)Sets the user data.voidupdatePoint(int index, Point2D pt)Updates the point.
 
- 
- 
- 
Method Detail- 
setStylepublic void setStyle(DynamicStyle style) Sets the style.- Parameters:
- style- The style.
 
 - 
setUserDatapublic void setUserData(java.lang.Object data) Sets the user data.- Parameters:
- data- The user data.
 
 - 
getUserDatapublic java.lang.Object getUserData() Gets the user data.- Returns:
- The user data.
 
 - 
getStylepublic DynamicStyle getStyle() Gets the style.- Returns:
- The style of the dynamic object.
 
 - 
getTypepublic DynamicElement.ElementType getType() Gets the type.- Returns:
- The type of dynamic object.
 
 - 
getGeoPointspublic Point2Ds getGeoPoints() Gets the tuples.- Returns:
- The point string of dynamic object.
 
 - 
getPartpublic java.util.ArrayList<java.lang.Integer> getPart() Gets the point string group info.- Returns:
- The point string group info.
 
 - 
getIDpublic int getID() Gets the ID of dynamic object.- Returns:
- The ID of dynamic object.
 
 - 
getBoundspublic Rectangle2D getBounds() Gets the range of dynamic object.- Returns:
- The border extent.
 
 - 
setOnClickListennerpublic void setOnClickListenner(DynamicElement.OnClickListener listener) Sets the clicking listener.- Parameters:
- listener- Click listener.
 
 - 
addPointpublic void addPoint(Point2D pt) Adds the point.- Parameters:
- pt- Added points.
 
 - 
updatePointpublic void updatePoint(int index, Point2D pt)Updates the point.- Parameters:
- index- Index
- pt- New Point coordinates
 
 - 
addAnimatorpublic void addAnimator(Animator animator) Adds the animation to the dynamic element. It can add mutiple animation.- Parameters:
- animator- Dynamic element Animation
 
 - 
fromGeometrypublic abstract boolean fromGeometry(Geometry geometry) Create the dynamic data through Geometry.- Parameters:
- geometry- Geographic elements
- Returns:
- A boolean, Returns true if the constructor successful; Otherwise false.
 
 - 
setMinShowScalepublic void setMinShowScale(double scale) Sets the minimum display scale.- Parameters:
- scale- Sets the minimum display scale.
 
 - 
getMinShowScalepublic double getMinShowScale() Gets the minimum display scale.- Returns:
- The minimum display scale.
 
 - 
setOnLongPressListenerpublic void setOnLongPressListener(DynamicElement.OnLongPressListener listener) Sets the long-click listener.- Parameters:
- listener- long-click listener.
 
 - 
getOnLongPressListenerpublic DynamicElement.OnLongPressListener getOnLongPressListener() Gets the long-click listening of this object- Returns:
- The long-click listener.
 
 - 
setTagpublic void setTag(java.lang.String tag) Sets the label.- Parameters:
- tag- Label.
 
 - 
getTagpublic java.lang.String getTag() Gets the label. Default value is null- Returns:
- Label.
 
 - 
setNamepublic void setName(java.lang.String name) Sets the name of a dynamic object.- Parameters:
- name- Name
 
 - 
getNamepublic java.lang.String getName() Gets the name of the dynamic object, and the default problem null.- Returns:
- Name
 
 - 
setNameVisiblepublic void setNameVisible(boolean visible) Sets whether the dynamic object name is visible, and is not visible by default.- Parameters:
- visible- Whether it is visible.
 
 - 
isNameVisiblepublic boolean isNameVisible() Gets whether the dynamic object name is visible, and the default false.- Returns:
- Whether it is visible.
 
 - 
setNameColorpublic void setNameColor(int color) Sets name font color, default black- Parameters:
- color- The color value.
 
 - 
setNameSizepublic void setNameSize(float size) Sets name font size default 16pixel.- Parameters:
- size- The size text.
 
 - 
getNameColorpublic int getNameColor() Gets the name font color.- Returns:
- The color value.
 
 - 
getNameSizepublic float getNameSize() Gets the name font size.- Returns:
- The name font size.
 
 - 
setNameTextAlignpublic void setNameTextAlign(DynamicAlignment align) Sets the name text to its method, the default center alignment.- Parameters:
- align- Alignment
 
 - 
getNameTextAlignpublic DynamicAlignment getNameTextAlign() Gets the name text to its method, the default center alignment.- Returns:
- Alignment
 
 - 
setNamePositionpublic void setNamePosition(Point2D position) Sets the location of the name text.- Parameters:
- position- Position coordinates, using map coordinates.
 
 - 
getNamePositionpublic Point2D getNamePosition() Gets the location coordinates of the name text, and if the user does not have the setting, the object center point is adopted by default.- Returns:
- Returns the position coordinate point Point2D, using the map coordinates.
 
 - 
disposepublic void dispose() Disposes resources.
 - 
setNameOffsetXpublic void setNameOffsetX(float offsetX) Sets the X offset of the name text.- Parameters:
- offsetX- Position offset
 
 - 
getNameOffsetXpublic float getNameOffsetX() - Parameters:
- offsetX- Gets the X offset of the name text.
- Returns:
- The X offset.
 
 - 
setNameOffsetYpublic void setNameOffsetY(float offsetY) Sets the Y offset of the name text.- Parameters:
- offsetY- Position offset
 
 - 
getNameOffsetYpublic float getNameOffsetY() Gets the Y offset of the name text.- Returns:
- The Y offset.
 
 - 
getOnDownAndUpListenerpublic DynamicElement.OnDownAndUpListener getOnDownAndUpListener() Gets the listener OnDownAndUpListener of the object- Returns:
- OnDownAndUpListener the listener
 
 - 
setOnDownAndUpListenerpublic void setOnDownAndUpListener(DynamicElement.OnDownAndUpListener listener) Sets the listeners as fingers press down or leave dynamic objects.- Parameters:
- listener- the listener for pressing down or leaving dynamic objects.
 
 - 
addPointspublic void addPoints(Point2Ds ps) Add point set- Parameters:
- pt-
 
 
- 
 
-